// JavaScript Document
var prox;
var proy;
var proxc;
var proyc;
function show(id) {
	/*--打开--*/
	clearInterval(prox);
	clearInterval(proy);
	clearInterval(proxc);
	clearInterval(proyc);
	var o = document.getElementById(id);
	o.style.display = "block";
	o.style.width = "1px";
	o.style.height = "1px";
	prox = setInterval(function () {
		openx(o, 205);
	}, 10);
}
function openx(o, x) {
	/*--打开x--*/
	var cx = parseInt(o.style.width);
	if (cx < x) {
		o.style.width = (cx + Math.ceil((x - cx) / 5)) + "px";
	} else {
		clearInterval(prox);
		proy = setInterval(function () {
			openy(o, 200);
		}, 10);
	}
}
function openy(o, y) {
	/*--打开y--*/
	var cy = parseInt(o.style.height);
	if (cy < y) {
		o.style.height = (cy + Math.ceil((y - cy) / 5)) + "px";
	} else {
		clearInterval(proy);
	}
}
function closeed(id) {
	/*--关闭--*/
	clearInterval(prox);
	clearInterval(proy);
	clearInterval(proxc);
	clearInterval(proyc);
	var o = document.getElementById(id);
	if (o.style.display == "block") {
		proyc = setInterval(function () {
			closey(o);
		}, 10);
	}
}
function closey(o) {
	/*--打开y--*/
	var cy = parseInt(o.style.height);
	if (cy > 0) {
		o.style.height = (cy - Math.ceil(cy / 5)) + "px";
	} else {
		clearInterval(proyc);
		proxc = setInterval(function () {
			closex(o);
		}, 10);
	}
}
function closex(o) {
	/*--打开x--*/
	var cx = parseInt(o.style.width);
	if (cx > 0) {
		o.style.width = (cx - Math.ceil(cx / 5)) + "px";
	} else {
		clearInterval(proxc);
		o.style.display = "none";
	}
}
/**左侧菜单js**/
function hidemenu() {
	document.getElementById("subframe").style.display = "none";
	document.getElementById("col_sub").style.display = "none";
	document.getElementById("hidesub").style.display = "none";
	document.getElementById("showsub").style.display = "block";
	document.getElementById("col_sub").className = "col_sub_hide";
	document.getElementById("col_extra").className = "col_extra_hide";
	document.getElementById("main_content").className = "main_content_hide";
	resetFrame();
}
function showmenu() {
	document.getElementById("subframe").style.display = "block";
	document.getElementById("col_sub").style.display = "block";
	document.getElementById("col_sub").className = "col_sub";
	document.getElementById("col_extra").className = "col_extra";
	document.getElementById("main_content").className = "main_content";
	document.getElementById("hidesub").style.display = "block";
	document.getElementById("showsub").style.display = "none";
	setmainFrame();
}
function resizeFrame(divid) {
	var h = document.documentElement.clientHeight;
	var j = h - 150;
	document.getElementById(divid).style.height = j + "px";
	if (divid = "mainframe") {
		var w = document.documentElement.clientWidth;
		var k = w - 204;
		document.getElementById(divid).style.width = k + "px";
	}
}
function resetFrame() {
	var w = document.documentElement.clientWidth;
	var t = w - 9;
	document.getElementById("mainframe").style.width = t + "px";
}
function setmainFrame() {
	var h = document.documentElement.clientHeight;
	var j = h - 150;
	document.getElementById("mainframe").style.height = j + "px";
	var w = document.documentElement.clientWidth;
	var k = w - 204;
	document.getElementById("mainframe").style.width = k + "px";
}
function switchNav(thisObj) {
//if(thisObj.className == "nav_on")return;
	var tabObj = thisObj.parentNode.id;
	var tabList = document.getElementById(tabObj).getElementsByTagName("li");
	var links = document.getElementById(tabObj).getElementsByTagName("a");
	for (i = 0; i < tabList.length; i++) {
		if (thisObj == tabList[i]) {
			var str = tabList[i].className.split("_")[0];
			tabList[i].className = str + "_on";
			links[i].setAttribute("class", "current");
			showmenu();
			setmainFrame();
		} else {
			var str = tabList[i].className.split("_")[0];
			tabList[i].className = str + "_off";
			links[i].setAttribute("class", " ");
		}
	}
}

